﻿using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Data.SqlClient;

/// <summary>
///PersonClass 的摘要说明
/// </summary>
public class PersonClass
{
	public PersonClass()
	{
		//
		//TODO: 在此处添加构造函数逻辑
		//
	}
    private SqlCommand cmd;
    public string ishm(string id)
    {
        string result = "0";
        try
        {
            cmd = new SqlCommand();
            cmd.Connection = ConDB.GetOpen();
            cmd.CommandText = "select count(*) from tb_person,tb_perclass where tb_person.pcid=tb_perclass.pcid and pid=@pid and pcname='高级会员'";
            cmd.Parameters.Add("@pid", SqlDbType.VarChar, 20).Value = id;
            int i = Convert.ToInt32(cmd.ExecuteScalar());
            if (i > 0)
            {
                result = "1";
            }
        }
        catch (Exception e)
        {
            result = "0";
        }
        finally
        {
            ConDB.Close();
        }
        return result;
    }
}
